package com.example.ioc.normal;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class TradeService implements ApplicationContextAware, InitializingBean {

    ApplicationContext applicationContext;

    public TradeService() {
        log.info("to init TradeService");
    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.applicationContext = applicationContext;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        log.info("-tradeService init-");
    }


    public void someThing() {

    }
}
